package com.mfangsoft.zhuangjialong.integration.activity.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.mfangsoft.zhuangjialong.app.entryactivity.model.BaseEntryActivity;
import com.mfangsoft.zhuangjialong.app.order.model.OrderGift;
import com.mfangsoft.zhuangjialong.common.model.Page;
import com.mfangsoft.zhuangjialong.common.utils.stereotype.WriterRepository;
import com.mfangsoft.zhuangjialong.integration.activity.model.BaseActivityInfo;
import com.mfangsoft.zhuangjialong.integration.activity.model.BaseActivityInfoItem;
import com.mfangsoft.zhuangjialong.integration.activity.model.BaseActivityShop;
import com.mfangsoft.zhuangjialong.integration.customer.model.Customer;
import com.mfangsoft.zhuangjialong.integration.gift.model.BaseGift;
import com.mfangsoft.zhuangjialong.integration.order.model.BaseOrder;
import com.mfangsoft.zhuangjialong.integration.user.model.UserEntity;
import com.mfangsoft.zhuangjialong.integration.user.model.UserRelationEntity;
@WriterRepository
public interface BaseActivityInfoMapper {
    /**
     * 通过主键删除  
     *
     * @MLTH_generated
     */
    int deleteByPrimaryKey(Integer id);

    /**
     * 插入数据  
     *
     * @MLTH_generated
     */
    int insert(BaseActivityInfo record);

    int insertSelective(BaseActivityInfo record);

    /**
     * 通过主键查询数据 
     *
     * @MLTH_generated
     */
    BaseActivityInfo selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(BaseActivityInfo record);

    int updateByPrimaryKeyWithBLOBs(BaseActivityInfo record);

    /**
     * 通过主键更新数据  
     *
     * @MLTH_generated
     */
    int updateByPrimaryKey(BaseActivityInfo record);
    /**
     * 新增  活动
     *
     * @MLTH_generated
     */
	void addActivbity(BaseActivityInfo baseActivityInfo);
	 /**
     * 新增活动内容关系表
     *
     * @MLTH_generated
     */
	void addActivbityItem(BaseActivityInfoItem baseActivityInfoItem);
	
	 /**
     * 新增活动内容关系表
     *
     * @MLTH_generated
     */
	List<Map<String, Object>> queryMerchantActivityForPage(Page<Map<String, Object>> page);
	 /**
     * 查询活动
     *
     * @MLTH_generated
     */
	List<BaseActivityInfo> selectActivityPage(Page<BaseActivityInfo> page);
	 /**
     * 活动查询
     *
     * @MLTH_generated
     */
	Map<String, Object> selectActivityOne(Long id);
	/**
     * 活动编辑
     *
     * @MLTH_generated
     */
	void updateActivityOne(BaseActivityInfo baseActivityInfo);
	/**
     * 活动item
     *
     * @MLTH_generated
     */
	List<BaseActivityInfo> selectActivityItem(BaseActivityInfo baseActivityInfo);
	/**
     * 活动店铺
     *
     * @MLTH_generated
     */
	void addActivbityShop(BaseActivityShop num);
	/**
     * 活动总数
     *
     * @MLTH_generated
     */
	Integer selectTotal();
	/**
     * 查询数据
	 * @param list 
	 * @return 
     *
     * @MLTH_generated
     */
	
	List<BaseActivityInfo> selectListActivityPage(Page<BaseActivityInfo> page);
	
	List<BaseActivityInfo> selectListActivityOnePage(Page<BaseActivityInfo> page);

	void updateActivityPutaway(BaseActivityInfo baseActivityInfo);

	Map<String, Object> selectActivityUser(BaseEntryActivity baseEntryActivity);

	void uptdateSign(BaseEntryActivity baseEntryActivity);

	Map<String, Object> selectHelperActivityUser(BaseEntryActivity baseEntryActivity);

	BaseActivityInfo selectSignGo(BaseActivityInfo baseActivityInfo);

	List<Map<String, Object>> selectHelperActivityPage(Page<Map<String,Object>> page);

	Map<String, Object> selectHelperActivityAll(BaseActivityInfo baseActivityInfo);

	int selectHelperActivityAllNum(BaseActivityInfo baseActivityInfo);

	List<BaseActivityInfo> selectActivityAuditPage(Page<BaseActivityInfo> page);

	BaseEntryActivity selectHelperActivityManage(BaseEntryActivity baseEntryActivity);

	List<BaseActivityInfoItem> selectActivityOneItme(Long id);

	UserRelationEntity userRelation(UserRelationEntity userRelation);

	Map<String, Object> selectActivityCard(BaseEntryActivity baseEntryActivity);

	List<Map<String, Object>> selectActivityItmes(BaseEntryActivity baseEntryActivity);

	List<Map<String, Object>> selectHelperActivityAllItmes(BaseActivityInfo baseActivityInfo);

	List<Map<String, Object>> selectHelperActivityAllPicture(BaseActivityInfo baseActivityInfo);

	Map<String, Object> selectActivityUserItmes(BaseEntryActivity baseEntryActivity);

	Map<String, Object> selectActivityUserItmesTwo(BaseEntryActivity baseEntryActivity);

	Map<String, Object> selectActivityUserItmesThree(BaseEntryActivity baseEntryActivity);

	List<Map<String, Object>> selectActivityUserItmesFor(BaseEntryActivity baseEntryActivity);

	List<Map<String, Object>> selectActivityUsersPage(Page<Map<String, Object>> page);

	Map<String, Object> selectHelperActivityPageTotal(Page<BaseActivityInfo> page);

	List<BaseActivityInfo> getActivitysByUserId(@Param(value = "user_id") Long user_id,@Param(value = "num") Integer num);

	void uptdateHeilernum(BaseActivityInfo baseActivityInfo);

	Map<String, Object> selectActivityItmesGiftF(BaseEntryActivity baseEntryActivity);

	List<Map<String, Object>> selectActivityItmesGiftFG(List list);

	Map<String, Object> selectActivityItmesGiftFive(BaseEntryActivity baseEntryActivity);

	List<Map<String, Object>> selectActivityItmesGiftFiveG(List list2);

	Map<String, Object> selectActivityItmesGiftone(BaseEntryActivity baseEntryActivity);

	List<Map<String, Object>> selectActivityItmesGiftOneG(List list3);

	void uptdateHelperActivityOrder(OrderGift orderGift);

	Map<String, Object> selectActivityItmesXCX(BaseEntryActivity baseEntryActivity);

	Map<String, Object> selectXCXActivity(BaseEntryActivity baseEntryActivity);

	List<Map<String, Object>> selectActivityComment(BaseEntryActivity baseEntryActivity);

	Map<String, Object> selectXCXSigo(Customer customer);

	List<Map<String, Object>> selectXCXHistoryActivity(Integer shop_id);

	List<Map<String, Object>> selectXCXHistoryActivityShop(Map<String, Object> map);


	List<Map<String, Object>> selectXCXHistoryActivityID(Integer shop_id);


	Map<String, Object> selectMinShopByLBS(Map<String, Object> map);

	List<Map<String, Object>> selectHelperActivityDetails(BaseEntryActivity baseEntryActivity);

	List<Map<String, Object>> selectHelperHistoryActivityPage(Page<Map<String, Object>> page);

	int selectSigoName(BaseEntryActivity baseEntryActivity);

	int selectActivityCode(String code);


	List<Map<String, Object>> shelectShopList(int bid);

	void delectActivityShop(int did);

	Map<String, Object> selectActivityItmesGiftSix(BaseEntryActivity baseEntryActivity);

	List<Map<String, Object>> selectActivityItmesGiftSixG(List list6);

	Map<String, Object> selectActivityItmesGiftSeven(BaseEntryActivity baseEntryActivity);

	List<Map<String, Object>> selectActivityItmesGiftSevenG(List list7);

	Map<String, Object> selectActivityItmesGiftEight(BaseEntryActivity baseEntryActivity);

	List<Map<String, Object>> selectActivityItmesGiftEightG(List list8);

	Map<String, Object> selectActivityEggs(Map<String, Object> dateMap);

	void uptdateGiftnum(BaseGift baseGift);

	Double selectHelperActivityUserPrice(BaseEntryActivity baseEntryActivity);

	List<BaseActivityInfo> selectAdminActivityPage(Page<BaseActivityInfo> page);
	
	List<BaseActivityInfo> selectListActivityAdminPage(Page<BaseActivityInfo> page);

	Map<String, Object> selectHelperActivityAllGeneralize(BaseActivityInfo baseActivityInfo);

	List<Map<String, Object>> selectXCXHistoryActivityIDGeneralize(Integer shop_id);

	void uptdateActivitynum(Map map);

	void addActivbityItems(BaseActivityInfoItem baseActivityInfoItem);

	void delectActivityItems(int did);

	void addAdminActivity(BaseActivityInfo baseActivityInfo);

	Integer selectFilialeId(Integer customer_id);

	List<Map<String, Object>> selectXCXHistoryActivityIDTwo(int filiale_id);

	List<Map<String, Object>> selectActivityIssueList(Integer activity_id);

	


}